package game;

import java.awt.Point;

public class GameDice {
	
	private DiceColour dc;
	private DiceType dt;
	private Point position;
	
	public GameDice(DiceColour diceColour, DiceType diceType, Point position) {
		this.setDiceColour(diceColour);
		this.setDiceType(diceType);
		this.setPosition(position);
	}
	
	public void setDiceColour(DiceColour dc) {
		this.dc = dc;
	}

	public DiceColour getDiceColour() {
		return dc;
	}

	public void setDiceType(DiceType dt) {
		this.dt = dt;
	}

	public DiceType getDiceType() {
		return dt;
	}

	public void setPosition(Point position) {
		this.position = position;
	}

	public Point getPosition() {
		return position;
	}

	public static enum DiceColour {
		
		BLUE("b"),
		RED ("r"),
		NULL("n");
		
		private final String shortName;
		DiceColour(String shortName) {	
			this.shortName = shortName;
		}
		
		public String getShortName() {
			return shortName;
		}
	}
	
	public static enum DiceType {
		
		ONE  ("1"),
		TWO  ("2"),
		THREE("3"),
		FOUR ("4"),
		FIVE ("5"),
		SIX  ("6"),
		KEY  ("k"),
		NULL ("n");
		
		private final String shortName;
		private DiceType(String shortName) {	
			this.shortName = shortName;
		}
		
		public int toInt() {
			return Integer.parseInt(shortName);
		}
		
		public String getShortName() {
			return shortName;
		}
		
	}
	
	
}
